package com.tledu.array1;

public class Array03 {
    public static void main(String[] args) {
        // 数组的变量
        int[] arrays = {9, 2, 4, 5, 6, 4, 1};
        for (int i = 0; i < arrays.length; i++) {
            System.out.println(arrays[i]);
        }
        System.out.println("----------------------------------------");
        // 通过增强的for循环进行遍历
        for (int num : arrays) {
            // 获取不到索引，
            System.out.println(num);
        }
    }
}
